using System.Text.RegularExpressions;
namespace ExtendedMvc.Html {
	public static class HtmlAttribute {
		public const string Id = "id";
		public const string Disabled = "disabled";
		public const string Checked = "checked";
		public const string Name = "name";
		public const string Type = "type";
		public const string Size = "size";
		public const string Multiple = "multiple";
		public const string Selected = "selected";
		public const string Rows = "rows";
		public const string Cols = "cols";
		public const string MaxLength = "maxlength";
		public const string Value = "value";
		public const string Title = "title";
		public const string Style = "style";
		public const string Class = "class";
		public const string For = "for";
		public const string HRef = "href";
		public const string Src = "src";
		public const string Width = "width";
		public const string Height = "height";

		//Custom Attributes
		public const string Required = "required";
		public const string Cursor = "cursor";
		public const string Single = "single";

		public static string ClearInvalidChars(string candidate) { return candidate == null ? null : Regex.Replace(candidate, "[^a-zA-Z0-9_]", "_"); }
	}
}
